using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Mvc.Ajax;
using Frogism.Core;

namespace Frogism.Web.Controllers
{
    public class DrinkController : FrogControllerBase
    {
        //
        // GET: /Drink/

        public ActionResult Index(DateTime? date)
        {
            DateTime runDate = date ?? DateTime.Now.CleanDate();
            var rep = new Domain.DrinkManager();
                       



            var items = new List<SelectListItem>();
            items.Add(new SelectListItem() { Selected = false, Text = "0", Value = "0" });
            items.Add(new SelectListItem() { Selected = false, Text = "1", Value = "1" });
            items.Add(new SelectListItem() { Selected = false, Text = "2", Value = "2" });
            items.Add(new SelectListItem() { Selected = false, Text = "3", Value = "3" });
            items.Add(new SelectListItem() { Selected = false, Text = "4", Value = "4" });
            items.Add(new SelectListItem() { Selected = false, Text = "5+", Value = "5" });

   
            ViewData["CountTypes"] = new SelectList(items,"Value", "Text");

            return View(rep.DrinksForDay(runDate));
        }

    }
}
